onStart
Called when an insets animation gets started.
This ordering allows the application to inspect the end state after the animation has finished, and then revert to the starting state of the animation in the first onProgress callback by using post-layout view properties like setX and related methods.
The ordering of events during an insets animation is the following:
- Application calls hide, show, controlWindowInsetsAnimation
- onPrepare is called on the view hierarchy listeners
- onApplyWindowInsets will be called with the end state of the animation
- View hierarchy gets laid out according to the changes the application has requested due to the new insets being dispatched
- onStart is called before the view hierarchy gets drawn in the new laid out state
- onProgress is called immediately after with the animation start state
- The frame gets drawn.
Note that, like onProgress, dispatch of the animation start event is hierarchical: It will starts at the root of the view hierarchy and then traverse it and invoke the callback of the specific View that is being traversed. The method may return a modified instance of the bounds by calling inset to indicate that a part of the insets have been used to offset or clip its children, and the children shouldn't worry about that part anymore. Furthermore, if getDispatchMode returns DISPATCH_MODE_STOP, children of this view will not receive the callback anymore.
Return
The animation bounds representing the part of the insets that should be dispatched to the subtree of the hierarchy.
Parameters
The animation that is about to start.
The bounds in which animation happens.